import React, { Component, Fragment } from 'react';
import {
  Table,
} from 'antd';

interface SettlementProps {
  settlementList: any;
}

class Settlement extends Component<SettlementProps> {
  columns: any = [
    {
      title: 'id',
      dataIndex: 'statement_id',
      align: 'center',
    },
    {
      title: '总收入',
      dataIndex: 'total_income',
      align: 'center',
    },
    {
      title: '总支出',
      dataIndex: 'total_expend',
      align: 'center',
    },
    {
      title: '应结金额',
      dataIndex: 'origin_amount',
      align: 'center',
    },
    {
      title: '实结金额',
      dataIndex: 'real_amount',
      align: 'center',
    },
  ]

  render() {
    const { settlementList } = this.props;

    return (
      <Fragment>
        <Table
          rowKey="statement_id"
          bordered
          className="statementTable tableList"
          columns={this.columns}
          dataSource={settlementList}
          pagination={false}
        />
      </Fragment>
    );
  }
}

export default Settlement;
